import java.util.Date;
import java.util.List;
import java.util.ArrayList;

// Customer 类
class Customer {
    private String name;
    private String contact;
    private String deliveryAddress;
    private boolean active;
    private List<Order> orders;

    public Customer(String name, String contact, String deliveryAddress, boolean active) {
        this.name = name;
        this.contact = contact;
        this.deliveryAddress = deliveryAddress;
        this.active = active;
        this.orders = new ArrayList<>();
    }

    // getters and setters
}

// Order 类
class Order {
    private Date createDate;
    private String status;
    private Customer customer;
    private List<OrderDetail> orderDetails;
    private List<Payment> payments;

    public Order(Date createDate, String status, Customer customer) {
        this.createDate = createDate;
        this.status = status;
        this.customer = customer;
        this.orderDetails = new ArrayList<>();
        this.payments = new ArrayList<>();
    }

}

// OrderDetail 类
class OrderDetail {
    private int quantity;
    private Product product;

    public OrderDetail(int quantity, Product product) {
        this.quantity = quantity;
        this.product = product;
    }

    public double calculateSubTotal() {
        return product.getPriceForQuantity(quantity);
    }

    public double calculateWeight() {
        return product.getWeight() * quantity;
    }

}

// Product 类
class Product {
    private String title;
    private double weight;
    private String description;

    public Product(String title, double weight, String description) {
        this.title = title;
        this.weight = weight;
        this.description = description;
    }

    public double getPriceForQuantity(int quantity) {
        // 实现根据数量获取价格的逻辑
        return 0;
    }

    public double getWeight() {
        return weight;
    }
}

// Payment 类
abstract class Payment {
    protected double amount;

    public Payment(double amount) {
        this.amount = amount;
    }

}

// Credit 类
class Credit extends Payment {
    private String number;
    private String type;
    private String expireDate;

    public Credit(double amount, String number, String type, String expireDate) {
        super(amount);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }

}

// Cash 类
class Cash extends Payment {
    private double cashTendered;

    public Cash(double amount, double cashTendered) {
        super(amount);
        this.cashTendered = cashTendered;
    }
}

// WireTransfer 类
class WireTransfer extends Payment {
    private String bankID;
    private String bankName;

    public WireTransfer(double amount, String bankID, String bankName) {
        super(amount);
        this.bankID = bankID;
        this.bankName = bankName;
    }

}

// AliPay 类
class AliPay extends Payment {
    private String number;

    public AliPay(double amount, String number) {
        super(amount);
        this.number = number;
    }
}

// WeixinPay 类
class WeixinPay extends Payment {
    private String number;

    public WeixinPay(double amount, String number) {
        super(amount);
        this.number = number;
    }


}